package com.killLog.common;

/**
用户状态
*/
public enum DataStatusEnum {
    UNDETERMINED("00","未确定"),
    DETERMINED("22","确定"),
    ACTIVE("55","启用"),
    DISABLED("77","禁用"),
    LOGICALLY_DELETE("99","逻辑删除");
    
    private String code;
    private String name;

    DataStatusEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }
    public String getCode() {return code;}
    public String getName() {return name;}
    /**
    通过传入的code去加载枚举中对应的name
    */
    public static String getStatusName(String code) {
        DataStatusEnum[] values = DataStatusEnum.values();
        for (DataStatusEnum value : values) {
            if (value.code.equals(code)) {
                return value.getName();
            }
        }
        return null;
    }
    
}
